<template>
	<view class="manage">
		<view class="vfor" v-for="(v,i) in list" :key="i">
			<view class="df detail">
				<view class="image">
					<image :src="v.src" mode="" class="image"></image>
				</view>
				<view class="right">
					<view class="com df">
						<view class="tt">下发时间</view>
						<view class="">：</view>
						<view class="content">{{v.time}}</view>
					</view>
					<view class="com df">
						<view class="tt">任务类型</view>
						<view class="">：</view>
						<view class="content">{{v.area}}</view>
					</view>
					<view class="com df">
						<view class="tt">状态</view>
						<view class="">：</view>
						<view class="content">{{v.area}}</view>
					</view>
				</view>
			</view>
			<view class="areaDetail">
				<view class="detailVfor" v-for="(item,index) in v.child" :key="index">
					<view class="com">
						<view class="tt">
							操作时间：
						</view>
						<view class="content">
							{{item.area}}
						</view>
					</view>
					<view class="button df">
						<view class="btnSuccess">
							联系操作员
						</view>
					</view>
				</view>
			</view>
		</view>
		<view class="add" @click="navTo('addTask')">
			新增任务
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [{
					src: require('../../static/indexBg.png'),
					time: '2022-09-09 13:33:22',
					area: '20m²',
					child: [{
						area: '2022-09-09 13:33:22'
					}]
				}]
			}
		},
		methods: {
			navTo(url) {
				uni.navigateTo({
					url: url
				})
			}
		}
	}
</script>

<style lang="scss" scoped>
	.manage {
		padding: 20rpx 30rpx;

		.df {
			display: flex;
		}

		.vfor {
			width: 650rpx;
			// height: 497rpx;
			background: #FFFFFF;
			box-shadow: 0rpx 0rpx 14rpx 0rpx rgba(0, 0, 0, 0.04);
			padding: 35rpx 20rpx 10rpx;

			.detail {
				padding-bottom: 20rpx;
				border-bottom: 1rpx solid rgba(0, 0, 0, 0.12);

				.image {
					width: 290rpx;
					height: 200rpx;
					border-radius: 20rpx;
					margin-right: 26rpx;
				}


				.right {
					padding-top: 23rpx;

					.btn {
						float: right;
						margin-top: 20rpx;
						width: 188rpx;
						height: 60rpx;
						background: #17CC77;
						border-radius: 8rpx;
						border: 2rpx solid #17CC77;
						text-align: center;
						line-height: 60rpx;
						color: #FFFFFF;
					}
				}
			}

			.areaDetail {

				.detailVfor {
					padding-top: 20rpx;
					position: relative;

					.name {
						font-size: 30rpx;
						color: #282828;
						margin-bottom: 20rpx;
					}

					.button {
						position: absolute;
						right: 0;
						top: 30rpx;

						.btnSuccess {
							width: 244rpx;
							height: 60rpx;
							background: #17CC77;
							border-radius: 8rpx;
							// border: 2rpx solid #17CC77;
							text-align: center;
							line-height: 56rpx;
							color: #FFFFFF;
							font-size: 28rpx;
						}
					}

					.tt {
						margin-bottom: 16rpx;
					}
				}
			}

			.com {
				font-size: 26rpx;
				margin-bottom: 20rpx;

				.tt {
					color: rgba(68, 78, 104, 0.7);
					white-space: nowrap;
					width: 100rpx;
					text-align: justify;
					text-align-last: justify;
				}

				.content {
					color: #1D1D1D;
					text-align: left;
				}
			}
		}

		.add {
			width: 280rpx;
			height: 88rpx;
			background: #1BC46D;
			box-shadow: 0rpx 0rpx 10rpx 0rpx rgba(27, 196, 109, 0.4);
			border-radius: 12rpx;
			font-size: 32rpx;
			color: #FFFFFF;
			line-height: 88rpx;
			text-align: center;
			position: absolute;
			bottom: 122rpx;
			left: 50%;
			margin-left: -140rpx;
		}
	}
</style>